let nextTodoId = 0;
export const addTodo = text=>{
    return {
        text,
        type:"ADD_TODO",
        id:nextTodoId++
    }
};

export const setVisibilityFilter = filter =>{
    return {
        type:"SET_VISIBILITY_FILTER",
        filter
    }
};

export const toggleTodo = id =>(
    {
        type: 'TOGGLE_TODO',
        id
    }
)